﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yunwei.Domain.Models.Mapping
{
    public class VendorCustomerMap : EntityTypeConfiguration<VendorCustomer>
    {
        public VendorCustomerMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Vendor_Id)
                .IsRequired();
            this.Property(t => t.Restaurant_Id)
                .IsRequired();

            this.ToTable("VendorRestaurantRel");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Vendor_Id).HasColumnName("Vendor_Id");
            this.Property(t => t.Restaurant_Id).HasColumnName("Restaurant_Id");
            this.Property(t => t.Vendor_Status).HasColumnName("Vendor_Status");
            this.Property(t => t.Restaurant_Status).HasColumnName("Restaurant_Status");
        }
    }
}
